package com.recommender.service;

import com.recommender.dao.MoviesDao;
import com.recommender.entity.Movies;
import com.recommender.entity.Movies;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MoviesServiceImpl implements MoviesService{
    @Autowired
    private MoviesDao moviesDao;

    public Movies queryById(int id){
        return moviesDao.queryById(id);
    }

    public List<Movies> queryAllByLimit(int offset, int limit){
        return moviesDao.queryAllByLimit(offset, limit);
    }

    public int insert(Movies movies){
        return moviesDao.insert(movies);
    }

    public int update(Movies movies){
        return moviesDao.update(movies);
    }

    public int deleteById(int id){
        return moviesDao.deleteById(id);
    }

    public int getCount(){ return moviesDao.getCount(); };

}
